package com.wisezone.permission.service;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

import com.wisezone.common.exception.WzDaoException;
import com.wisezone.common.exception.WzServiceException;
import com.wisezone.common.exception.WzWebException;
import com.wisezone.common.service.BaseService;
import com.wisezone.permission.bean.entity.WzGroupEntity;
import com.wisezone.permission.bean.search.WzGroupSearch;

/**
 * 
 *用户组; InnoDB free: 24576 kB
 * 
 * @author create by create date 2010-07-29 14:44:41 update date 2010-07-29
 *         14:44:41
 * 
 */
public interface WzGroupService extends BaseService {

	/**
	 * 获得用户组id和名称的map
	 * 
	 * @param id
	 * @return
	 */
	public Map<String, String> getMapByRoleId(Long id)
			throws WzServiceException;

	/**
	 * 获得激活的用户组列表
	 * 
	 * @return
	 * @throws WzWebException
	 */
	public List<WzGroupSearch> listActive() throws WzWebException;

	/**
	 * 获得用户组列表
	 * 
	 * @param userId
	 * @return
	 * @throws WzServiceException
	 */
	public List<WzGroupEntity> listGroupByUserId(Long userId)
			throws WzServiceException;

	/**
	 * 保存或修改用户组
	 * 
	 * @param entity
	 * @param roleIds
	 * @throws WzServiceException
	 */
	public void saveOrUpdate(WzGroupEntity entity, String roleIds)
			throws WzServiceException;

	/**
	 * 删除用户组
	 * 
	 * @param idList
	 * @throws WzServiceException
	 */
	public void delete(Collection<Serializable> idList)
			throws WzServiceException;

}